class LinearEquation:
    def __init__(self,a,b,c,d,e,f):
        self.__a = a
        self.__b = b
        self.__c = c
        self.__d = d
        self.__e = e
        self.__f = f

    def solvable(self):
        return self.__a*self.__d - self.__b*self.__c

    def isSolvable(self):
        return self.solvable() != 0

    def getX(self):
        if self.isSolvable():
            return str((self.__e * self.__d - self.__b*self.__f) / self.solvable())
        else:
            return "error"

    def getY(self):
        if self.isSolvable():
            return str((self.__a * self.__f - self.__e*self.__c) / self.solvable())
        else:
            return "error"

def main():
    x1, y1, x2, y2 = eval(input("请输入两个点："))
    x3, y3, x4, y4 = eval(input("请再输入两个点："))
    a = y1 - y2
    b = -(x1 - x2)
    e = (y1 - y2) * x1 - (x1 - x2) * y1
    c = y3 - y4
    d = -(x3 - x4)
    f = (y3 - y4) * x3 - (x3 - x4) * y3
    line = LinearEquation(a,b,c,d,e,f)
    if line.isSolvable():
        print("两条线的交点为：（",line.getX() ,line.getX() ,"） ")
    else:
        print("两条线平行")


main()